package com.powernode.service.impl;

import com.powernode.domain.ShoppingCart;
import com.powernode.mapper.ShoppingCartMapper;
import com.powernode.service.ShoppingCartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ShoppingCartServiceImpl implements ShoppingCartService{

    @Autowired
    private ShoppingCartMapper shoppingCartMapper;

    @Override
    public List<ShoppingCart> listShoppingCartsByUserId(int userId) {
        List<ShoppingCart> list = shoppingCartMapper.selectByPrimaryUserId(userId);

        return  list;
    }
}
